import type { MenuItem } from '@/utils/router-menu'
import { scanLocalMenu } from './menu-scan-local'


export function scannable(menuGroup: string) {
    return menuGroup == 'local'
}


export function scanMenuFromRoutes(menuGroup: string): Promise<MenuItem[]> {
    if (menuGroup == 'local') {
        return new Promise<MenuItem[]>((resolve) => {
            scanLocalMenu().then((menu) => {
                resolve(menu)
            })
          })
    } else {
        return Promise.resolve([])
    }
}
